/*
 ============================================================================
 Name		: FbListItem.h
 Author	  : ceze
 Version	 :
 Copyright   : FlashBox for ver.Zhongyou(???)
 Description : CFbListItem declaration
 ============================================================================
 */

#ifndef FBLISTITEM_H
#define FBLISTITEM_H

// INCLUDES
#include <e32std.h>
#include <e32base.h>
#include <FBS.H>
#include "MulImage.h"

// CLASS DECLARATION

/**
 *  CFbListItem
 * 
 */
class CFbListData : public CBase, MMulImageObserver
{
public:
	// Constructors and destructor

	/**
	 * Destructor.
	 */
	virtual ~CFbListData ();

	/**
	 * Constructor for performing 1st stage construction
	 */
	CFbListData (TInt aItemId = -1);

	/**
	 * EPOC default constructor for performing 2nd stage construction
	 */
	void ConstructL (const TInt &aTitleResId, const TInt &aDescriptResId = 0);
	
	/**
	 * TDes
	 */
	void ConstructL(const TDesC &aTitle, const TDesC &aDescript = KNullDesC);
	void ConstructL(const TDesC8 &aTitle, const TDesC8 &aDescript = KNullDesC8);
	/**
	 * create item's icon by CFbsBitmap instance
	 */
	void SetItemIcons(CFbsBitmap * pSmall, CFbsBitmap *pLarge);
	
	/**
	 * create item's icon by jpg file path
	 */
	void SetItemIconsL(const TDesC &aSmallPath, const TDesC &aLargePath = KNullDesC);
	/**
	 * 
	 */
	TInt GetItemId();
	
	/**
	 * 
	 */
	HBufC *GetTitle();
	
	/**
	 *
	 */
	HBufC* GetDescript();
	
	/**
	 * set the descript to show or disshow
	 */
	void SetDescriptShow(TBool isShow);
	
	/**
	 * 
	 */
	TBool IsShowDescript();
	
	/**
	 * 
	 */
	void SetIconUrl(const TDesC8 &iconUrl);
	
	inline void SetDataStoreType(TInt aType)
	{
		m_dataStoreType = aType;
	};
	
	inline TInt DataStoreType()
	{
		return m_dataStoreType;
	};
private:
	void MulImageReady (CMulImage *pImage );
	
public:
	CFbsBitmap		*m_pSmallIcon;//小图标
	CFbsBitmap		*m_pLargeIcon;//大图标
	CMulImage		*m_pMulImage;//jpg(url)图标
	TAny*			m_pDataBlock;
	HBufC8			*m_pIconUrl;//图标url
private:
	TInt			m_ItemId;//id
	TBool			m_isShowDescript;//

	HBufC			*m_pItemTitle;//标题
	HBufC			*m_pItemDescript;//描述

	TInt 			m_dataStoreType;//数据类型
	
	

};

#endif // FBLISTITEM_H
